# -*- coding:utf-8 -*-

page = '''

'''
user_name = "tlq"
print(f"//a[text()='{user_name}喜欢的音乐']")
import re
#匹配文本
obj1 = re.compile(r'<ul class="f-hide">(?P<ul>.*?)</li></ul>', re.S)
obj2 = re.compile(r'">(?P<music_name>.*?)</a>', re.S)
obj3 = re.compile(r'id=(?P<music_id>.*?)"', re.S)
m = obj1.findall(page)
print(m)
music_name = obj2.findall(m[0])
music_id = obj3.findall(m[0])
print(music_id)
print(music_name)
print(len(music_id))
print(len(music_name))